package yunc.checkData.pojo;

public class DescTide {
    private String thisRecordType;
    private String nextRecordType;
    private String serialNo;
    private String instrumentCode;

    public DescTide() {
    }

    public DescTide(String thisRecordType, String nextRecordType, String serialNo, String instrumentCode) {
        this.thisRecordType = thisRecordType;
        this.nextRecordType = nextRecordType;
        this.serialNo = serialNo;
        this.instrumentCode = instrumentCode;
    }

    public DescTide(String str) {
        this.thisRecordType = str.substring(0,1);
        this.nextRecordType = str.substring(1,2);
        this.serialNo = str.substring(2,3);
        if (str.length()>3 && str.contains(":")){
            this.instrumentCode = str.substring(3).split(":")[1].replace(" ","");
        }
    }

    public String getThisRecordType() {
        return thisRecordType;
    }

    public void setThisRecordType(String thisRecordType) {
        this.thisRecordType = thisRecordType;
    }

    public String getNextRecordType() {
        return nextRecordType;
    }

    public void setNextRecordType(String nextRecordType) {
        this.nextRecordType = nextRecordType;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public String getInstrumentCode() {
        return instrumentCode;
    }

    public void setInstrumentCode(String instrumentCode) {
        this.instrumentCode = instrumentCode;
    }

    @Override
    public String toString() {
        return "DescTide{" +
                "thisRecordType='" + thisRecordType + '\'' +
                ", nextRecordType='" + nextRecordType + '\'' +
                ", serialNo='" + serialNo + '\'' +
                ", instrumentCode='" + instrumentCode + '\'' +
                '}';
    }
}
